﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace SampleWebApplication
{
    public partial class Insert_data : System.Web.UI.Page
    {
        Db_connect db= new Db_connect();
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            TextBox4.Text = "";
            TextBox5.Text = "";
            TextBox3.Text = "";
            TextBox2.Text = "";
        
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            string query2 = "Insert into customer(name,address, birthdate, age) values('" +this.TextBox2.Text + "','" + this.TextBox3.Text + "','" + this.TextBox4.Text + "','" + this.TextBox5.Text + "')";
            bool check = db.insertDeleteUpdateValues(query2);

            if (check)
            {
                Label1.Text = "Data successfuly Inserted";
            }
            else {
                Label1.Text = "Data Not Inserted";
            }



        }


    }
}